#!/usr/local/bin/perl
use warnings;
use Card;
use DefaultDeck;

$deck = new DefaultDeck();
sub main()
{
$c = "";
print "This is a default deck:"."\n";

$deck->print();

print ""."\n";

print "This is the same deck shuffled:"."\n";

$deck->shuffle();

$deck->print();

print ""."\n";

$c = $deck->draw()->getname();

print ""."\n";

print "This is the rest of the deck:"."\n";

$deck->print();

print ""."\n";

print "This was the first card drawn from the deck:"."\n";

return $c;
}
sub value {
$name = $_[0];
$value = substr $name, 1;
if ($value eq "A")
{
return 1;
}
else
{if ($value eq "J")
{
return 11;
}
else
{
if ($value eq "Q")
{
return 12;
}
else
{
if ($value eq "K")
{
return 13;
}
else
{
return $value;
}
}
}
}
}


print main()."\n";
